Skip to content

fix(android): return webview id from openWebView promise#474

Closed
riderx wants to merge 1 commit intomainfrom
feature/issue-472-webviewid-resolve
Closed

fix(android): return webview id from openWebView promise#474
riderx wants to merge 1 commit intomainfrom
feature/issue-472-webviewid-resolve

Conversation

@riderx
Copy link
Member

@riderx riderx commented Mar 16, 2026

Summary\n- ensure Android openWebView resolves plugin call with uid=501(martindonadieu) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),702(com.apple.sharepoint.group.2),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae),701(com.apple.sharepoint.group.1) in WebViewDialog paths\n- prevent undefined return when WebViewDialog resolves before plugin-level resolve\n\n## Testing\n- bun run build\n- bun run verify:web\n- bun run verify (fails in sandbox at iOS step due missing Xcode project/simulator access)\n- bun run verify:android (fails in sandbox due Gradle lockfile permission under ~/.gradle)\n\nCloses #472

Summary by CodeRabbit

  • Refactor
    • Updated in-app browser plugin to streamline plugin call resolution with consistent ID handling across multiple call sites.

@sonarqubecloud
Copy link

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fed11ed7-0cf7-47b4-8b3b-47d3feeeebeb

📥 Commits

Reviewing files that changed from the base of the PR and between fc69bd8 and 313a54b.

📒 Files selected for processing (1)
  • android/src/main/java/ee/forgr/capacitor_inappbrowser/WebViewDialog.java

📝 Walkthrough

Walkthrough

A helper method resolvePluginCallWithId() was added to consolidate plugin call resolution logic across three call sites in the WebViewDialog class. The new method ensures all resolutions include an ID field derived from the instanceId, replacing direct calls to getPluginCall().resolve().

Changes

Cohort / File(s) Summary
WebViewDialog Refactoring
android/src/main/java/ee/forgr/capacitor_inappbrowser/WebViewDialog.java
Added private helper method resolvePluginCallWithId() to centralize plugin call resolution with ID field inclusion. Updated three existing call sites to use the new helper instead of direct resolution calls.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A helper hops forth with ID in hand,
Three paths now unified, perfectly planned,
No more scattered calls to resolve,
Just one method our troubles dissolve!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(android): return webview id from openWebView promise' directly describes the main change: ensuring the Android openWebView method returns a WebView ID from the promise, which matches the core objective of adding the resolvePluginCallWithId() helper method.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/issue-472-webviewid-resolve
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@riderx
Copy link
Member Author

riderx commented Mar 17, 2026

close in favor of #476

@riderx riderx closed this Mar 17, 2026
@riderx riderx deleted the feature/issue-472-webviewid-resolve branch March 17, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant